<template>
    <div id="app">
        <Header v-if="isRouterAlive"></Header>
        <!--    路由导航-->
        <router-view v-if="isRouterAlive"></router-view>
        <Footer v-show="$route.meta.show"></Footer>
    </div>
</template>

<script>
    import Header from "./components/Header";
    import Footer from "./components/Footer";

    export default {
        name: 'App',
        provide(){
            return{
                reload:this.reload
            }
        },
        data() {
            return {
                isRouterAlive:true
            }
        },
        components: {
            Header,
            Footer
        },
        methods: {
            reload(){
                this.isRouterAlive=false
                this.$nextTick(function () {
                    this.isRouterAlive=true
                })
            }
        }
    }
</script>

<style>
</style>
